package de.dhbw.ka.tit09.picsim.model;

import java.util.List;

/**
 * Representation of the source file contents. Stores source text and operation
 * codes.
 * 
 * @author Andreas Bender
 * 
 */
public class ProgramCode {
	private List<Command> commands;

	private List<SourceText> sourceText;

	/**
	 * Constructor.
	 * 
	 * @param commands the instructions list
	 * @param sourceText the source text rows
	 */
	public ProgramCode(List<Command> commands, List<SourceText> sourceText) {
		this.setCommands(commands);
		this.setSourceText(sourceText);
	}

	/**
	 * Sets the command list.
	 * 
	 * @param commands the instructions
	 */
	public void setCommands(List<Command> commands) {
		this.commands = commands;
	}

	/**
	 * Returns the command list.
	 * 
	 * @return the instructions list
	 */
	public List<Command> getCommands() {
		return commands;
	}

	/**
	 * Sets the source text.
	 * 
	 * @param sourceText the source text
	 */
	public void setSourceText(List<SourceText> sourceText) {
		this.sourceText = sourceText;
	}

	/**
	 * Returns the source text.
	 * 
	 * @return the source text
	 */
	public List<SourceText> getSourceText() {
		return sourceText;
	}
}
